#include "Embeddable.h"
#include<stdlib.h>

//a default implementation for embeddable.
namespace DefaultImplementation
{
	using namespace Embeddable;
	extern "C" void* embed_malloc(unsigned int __size)
	{	return malloc(__size);	}

	extern "C" void* embed_calloc(unsigned int __nmemb, 
					unsigned int __size)
	{	return calloc(__nmemb, __size);	}

	extern "C" void* embed_realloc(void* __ptr, 
					unsigned int __size)
	{	return realloc(__ptr, __size);	}

	extern "C" void embed_free(void* __ptr)
	{	free(__ptr);	}

	extern void* embed_memalign(unsigned int __alignment, 
				unsigned int __size)
	{	
		//return memalign(__alignment, __size);	
		return 0;
	}

	extern void* embed_valloc(unsigned int __size)
	{	return valloc(__size);	}
	
}

